package com.woniuxy.dao;


import com.woniuxy.entity.Doctor;
import com.woniuxy.entity.DoctorAndDepartment;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
@Mapper
public interface DoctorDao {
  //添加医生
  void  insertDoctor(Doctor doctor)  ;
  //删除医生
  void  deleteByDoctorId(int doctorId);
  //修改医生信息
  void  updateDoctor(Doctor  doctor);

  //用id查询医生
  Doctor selectDoctorById(int doctorId);

  //用id查询医生姓名和科室
  DoctorAndDepartment selectDoctorMessageById(int doctorId);

  //用名字查询医生id
  Doctor selectDoctorByName(String doctorName);

  //查询医生 分页展示
  List<Doctor>selectDoctor(@Param("doctor")Doctor  doctor,@Param("pageIndex")
          int pageIndex,@Param("pageSize")int pageSize);

  //医生总条数
  int selectDoctorCount(@Param("doctor")Doctor  doctor);

  //查询指定科室的医生
  List<Doctor> selectByDepartments(String departmentsName);

}
